<%@page import="java.text.ParseException"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%-- 日期操作类 --%>
<%!
	public static String formatDate(String format){
    	SimpleDateFormat sdf = new SimpleDateFormat(format);
		java.util.Date d = new java.util.Date();
		return sdf.format(d);
	}

	public static String formatDate(String format,java.util.Date date){
	    SimpleDateFormat sdf = new SimpleDateFormat(format);
		return sdf.format(date);
	}
    
	public static Date toDate(String strDate,String format) throws ParseException{
        SimpleDateFormat sdf = new SimpleDateFormat(format);
        return sdf.parse(strDate);
    }
%>

